import axios from '@/libs/api.request'

export const getTeacherList = (seachParams) => {
  return axios.request({
    url: 'teachers',
    method: 'get',
    params: seachParams
  })
}

export const getTeacher = (id) => {
  return axios.request({
    url: 'teachers/' + id,
    method: 'get'
  })
}

export const addTeacher = (data) => {
  return axios.request({
    url: 'teachers',
    method: 'post',
    data: data
  })
}

export const updateTeacher = (id, data) => {
  return axios.request({
    url: 'teachers/'+id,
    method: 'put',
    data: data
  })
}

export const deleteTeacher = (id) => {
  return axios.request({
    url: 'teachers/'+id,
    method: 'delete'
  })
}
